package com.coco.goods.feign;

import com.coco.common.result.CommonResponse;
import com.coco.goods.pojo.TbPostage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author minicoco
 * @version 1.0
 * @date 2021/7/17 19:21
 */
@FeignClient(name = "coco-expressfee")
@RequestMapping("/expressfee")
public interface PostageFeignService {

    /**
     * 添加
     *
     * @Author: minicoco
     * @Date: 2021/7/19
     * @Param: [goods]
     * @return: com.coco.common.result.CommonResponse
     */
    @RequestMapping("/add")
    CommonResponse add(@RequestBody TbPostage goods);

    /**
     * 查询
     *
     * @Author: minicoco
     * @Date: 2021/7/19
     * @Param: [goods]
     * @return: com.coco.common.result.CommonResponse
     */
    @GetMapping("/findByGid/{gid}")
    List<TbPostage> findByGid(@PathVariable("gid") String gid);


    /**
     * 删除
     *
     * @Author: minicoco
     * @Date: 2021/7/19
     * @Param: [goods]
     * @return: com.coco.common.result.CommonResponse
     */
    @DeleteMapping("/deleteByGid/{gid}")
    CommonResponse deleteByGid(@PathVariable("gid") String gid);
}
